Skip to content

[SDK-239] Fix dataset types #1262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2023
Merged

[SDK-239] Fix dataset types #1262

merged 1 commit into from
Oct 27, 2023

Conversation

mnoszczak
Copy link
Contributor

@mnoszczak mnoszczak commented Oct 17, 2023

Makes the types more correct

@mnoszczak mnoszczak requested review from a team, vbrodsky and apollonin October 17, 2023 12:45
Copy link
Contributor

@kopreschko kopreschko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@vbrodsky vbrodsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@vbrodsky vbrodsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here we have a default None, so Optional is not required:
https://docs.python.org/3/library/typing.html#typing.Optional

@mnoszczak
Copy link
Contributor Author

@vbrodsky:

PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True. Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebasemypynote

@@ -68,8 +68,8 @@ class Dataset(DbObject, Updateable, Deletable):

def data_rows(
self,
from_cursor: str = None,
where: Comparison = None,
from_cursor: Optional[str] = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is tricky, but correct change I believe, based on https://docs.python.org/3/library/typing.html#typing.Optional

@mnoszczak mnoszczak merged commit 82373e9 into develop Oct 27, 2023
@mnoszczak mnoszczak deleted the mno/sdk-239 branch October 27, 2023 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants